package com.lm.paymentweb.remote;


import com.lm.paymentweb.common.Result;
import com.lm.paymentweb.configuration.FeignMultipartSupportConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;


/**
 * @author liu2dog
 */
@FeignClient(name = "payment-admin",configuration = FeignMultipartSupportConfig.class)
public interface CommonRemote {

    @PostMapping(value = "/common/uploadOSS",produces = {MediaType.APPLICATION_JSON_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    Result uploadOSS(@RequestPart(value = "file") MultipartFile file,
                                 @RequestParam(value = "appSource")String appSource);
}
